package com.guoning.office_system.service.impl;

import com.guoning.office_system.mapper.RoleUserMapper;
import com.guoning.office_system.model.RoleUser;
import com.guoning.office_system.model.User;
import com.guoning.office_system.service.RoleUserService;
import com.guoning.office_system.vo.Criteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class RoleUserServiceImpl implements RoleUserService {
    @Autowired
    RoleUserMapper mapper;

    @Override
    public Map getUsers(Long roleId) {
        Map map = new HashMap();
        map.put("list", mapper.selectUserByRoleId(roleId));
        map.put("unList", mapper.selectNaNUserByRoleId(roleId));
        return map;
    }

    @Override
    public int updateForDelete(Criteria criteria) {
        return mapper.updateForDelete(criteria);
    }

    @Override
    public int deleteByPrimaryKey(Long id) {
        return 0;
    }

    @Override
    public int insert(Criteria criteria) {
        return mapper.insert(criteria);
    }

    @Override
    public int insertSelective(RoleUser record) {
        return 0;
    }

    @Override
    public RoleUser selectByPrimaryKey(Long id) {
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(RoleUser record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(RoleUser record) {
        return 0;
    }
}